<?php
/**
 * Author: dai
 * DateTime: 2016/11/2 19:46
 */
namespace App\Http\Controllers\Api\Wx;

use App\Services\WxService;
use Log;

/**
 * 微信调用的入口类
 * Class IndexController
 * @package App\Http\Controllers\Api\Wx
 */
class IndexController extends BaseController
{
    /**
     * 微信调用的入口方法
     * @return bool
     */
    public function index()
    {
        if(!WxService::valid()){
            return false;
        }
        return response($this->responseMsg());
    }

    /**
     * 处理消息
     * @return string
     */
    public function responseMsg()
    {
        $postObj = WxService::postStr();
        return WxService::textMsg($postObj, 'test2');
    }



}